{% extends base %}

{% block head %}
<style type="text/css">
    .note-list-box {
        min-height: 450px;
    }
</style>
{% end %}

{% block body_top %}
    {% init show_back = True %}
    {% init show_create_option = True %}

    <div class="card">
        <div class="grid-title">
            <span>{{title}}</span>
            <div class="float-right">

                {% if show_create_option %}
                    <a class="btn" href="/note/create?parent_id={{parent_id}}&type={{create_type}}">{{create_text}}</a>
                {% end %}

                <a class="btn btn-default" href="/note/tools">工具</a>

                {% if show_back %}
                    {% include common/button/back_button.html %}
                {% end %}
            </div>
        </div>

        {% include note/script/create_script.html %}
    </div>
{% end %}


{% block body_left %}
    
    {% init notes = [] %}
    {% init show_pagination = False %}

    <div class="card">
        {% include note/component/note_path.html %}
    </div>

    <div class="card note-list-box">
        {% if len(notes) == 0 %}
            {% include common/text/empty_text.html %}
        {% end %}

        {% for item_temp in notes %}
            <a class="list-link" href="{{item_temp.url}}">
                
                {% if item_temp.priority>0 %}
                    <i class="fa fa-thumb-tack black"></i>
                {% end %}

                <!-- 图标和标题 -->
                <i class="fa {{item_temp.icon}} fa-{{item_temp.icon}} black"></i>                
                <span>{{item_temp.name}}</span>
                <div class="float-right">
                    <span class="book-size-span">{{item_temp.badge_info}}</span>
                    <i class="fa fa-chevron-right"></i>
                </div>
            </a>
        {% end %}

    </div>

    {% if show_pagination %}
        <div class="card">
            {% include base/pagination.html %}
        </div>
    {% end %}

{% end %}

{% block body_right %}
    <div class="desktop-only">
        {% init show_recent_update = False %}

        {% include note/component/group_special_folder.html %}
        {% include note/card/note_types.html %}

        {% if show_recent_update %}
            {% include note/card/recent_update_notes.html %}
        {% end %}
    </div>
{% end %}

